Skip to content

docs(todo): 順位 1-3 グローバルルール完了に伴い todo エントリを削除#85

Merged
aloekun merged 1 commit intomasterfrom
todo-cleanup-rank-1-3
Apr 28, 2026
Merged

docs(todo): 順位 1-3 グローバルルール完了に伴い todo エントリを削除#85
aloekun merged 1 commit intomasterfrom
todo-cleanup-rank-1-3

Conversation

@aloekun
Copy link
Copy Markdown
Owner

@aloekun aloekun commented Apr 28, 2026

Summary

~/.claude/ 配下のグローバルルール 3 件 (順位 1-3) を整備したことに伴い、本リポジトリの docs/todo.md / docs/todo2.md から完了エントリを削除し、推奨実行順序サマリーの table を再採番する。

グローバルルール側の追加 (本リポジトリ外、参考)

  • ~/.claude/rules/common/git-workflow.md
    • ## jj Operations / ### todo.md 完了タスク削除手順 (jj 環境) を追加
    • ## Branch Protection 方針 (個人開発 + AI エージェント前提) を追加
  • ~/.claude/CLAUDE.md の Personal Preferences 配下
    • ### Decision Handling — 却下済み変更の再適用禁止 を追加

本 PR の変更

  • docs/todo.md: 順位 1 (git-workflow.md jj 運用節更新) + 順位 2 (個人開発ブランチ保護方針) エントリを削除
  • docs/todo2.md: 順位 3 (却下済み変更の再適用防止) エントリを削除
  • 推奨実行順序サマリー table を 13 → 10 に renumber + 戦略/注記を更新
  • 残タスク本文の「実行優先度」行 (4 箇所) と cross-reference を新採番に更新

新ルールのドッグフード

本 PR 自体が、追加した「jj 環境での todo.md 完了タスク削除手順」(本作業 commit と削除 commit を jj new で分離) の初運用例である。markdownlint WIP commit (ntqxrtyz) は別 PR 用に sibling として保持。

Test plan

  • pre-push-review (simplicity + security) APPROVED
  • CI (lint / test / build / rust-test) パス
  • CodeRabbit レビュー異常なし
  • table renumber の一貫性を目視確認 (順位 1-10、依存参照、cross-ref)
  • 削除済みエントリへの dangling 参照ゼロを grep で確認済 (push 前検証)

Summary by CodeRabbit

リリースノート

  • ドキュメント

    • プロジェクトの優先度体系と実行順序を更新しました。
  • 雑務

    • 開発プロセス支援用のツールを追加しました。

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Warning

Rate limit exceeded

@aloekun has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 42 minutes and 32 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e96e0e51-3325-429f-a41e-0431eb52b80a

📥 Commits

Reviewing files that changed from the base of the PR and between 139cbe9 and f1c62dc.

📒 Files selected for processing (3)
  • .gitignore
  • docs/todo.md
  • docs/todo2.md
📝 Walkthrough

Walkthrough

PowerShellスクリプト __parse_transcripts.ps1 を新規追加し、最大50個の最新トランスクリプトファイルから Bash コマンドを抽出します。並行して、ドキュメント docs/todo.md および docs/todo2.md の優先度体系を再編成し、13順位から10順位への変更と複数タスクの優先度付け替えを実施しました。

Changes

Cohort / File(s) Summary
PowerShell Transcript Extraction
__parse_transcripts.ps1
新規スクリプト:UTF-8 形式の JSONL ファイルを最大50件読み込み、assistant メッセージ内の Bash tool_use コマンドを抽出し、一時ファイルに出力。パースエラーはサイレント処理。
Task Priority Reorganization
docs/todo.md, docs/todo2.md
推奨実行順序の優先度体系を 13 順位から 10 順位へ統一。複数タスク(ADR-030、ADR-031、reviewer facet 改善、docs-only PR 高速パス等)の Tier/順位を再割り当て。完了タスク削除と戦略文の更新を実施。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PRのタイトルは「docs(todo): 順位 1-3 グローバルルール完了に伴い todo エントリを削除」で、変更内容の主要な目的を正確に反映しています。docs/todo.md と docs/todo2.md における完了済みタスク削除と優先度番号付けの更新という主要な変更を簡潔に説明しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/todo2.md (1)

7-7: ⚠️ Potential issue | 🟠 Major

リンク先アンカーが旧日付のままで参照不一致(リンク切れの原因)

Line 7 の参照先アンカーが 2026-04-27 のままです。一方、docs/todo.md 側の見出しは 2026-04-28 更新 に更新されているため、アンカーが対応していません。このままではリンク先が正しく解決されません。

🔧 修正案
-> **推奨実行順序**: 全タスク横断のサマリーは [docs/todo.md](todo.md#推奨実行順序サマリー-2026-04-27-更新) を参照。本ファイルに記録する ADR-032 は sub-phase ごとに Tier が分散するため、各 Phase の冒頭に個別の優先度を記載。
+> **推奨実行順序**: 全タスク横断のサマリーは [docs/todo.md](todo.md#推奨実行順序サマリー-2026-04-28-更新) を参照。本ファイルに記録する ADR-032 は sub-phase ごとに Tier が分散するため、各 Phase の冒頭に個別の優先度を記載。
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/todo2.md` at line 7, docs/todo2.md
の参照アンカーが古い日付「推奨実行順序サマリー-2026-04-27-更新」を指しているためリンク切れになっています。該当の参照を新しい見出しアンカー名「推奨実行順序サマリー-2026-04-28-更新」に置き換え(または
docs/todo.md 側の正確なアンカー名に合わせる)ように修正してください。該当箇所はファイル内の "推奨実行順序"
を含む行で、置換対象の文字列を更新すれば完了です。
🧹 Nitpick comments (1)
docs/todo.md (1)

13-33: 推奨実行順序サマリー:表の「依存」列セル表現が少し紛らわしい

Line 19 の順位1行目で、依存 列が なし (順位 6 の前提) になっています。

  • 「依存(=このタスクを進めるために必要な前提)」として読むと、順位6 が必要前提に見えてしまう可能性があります。
  • 一方で、文脈的には「順位6の実行可否に効く(=順位6の前提として機能する)」を意図しているようにも読めます。

読み手の誤読を避けるため、セル表現を 前提/後続の前提 など意味が明確な表現に寄せるか、表の列見出し/注釈を軽く補うことを推奨します。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/todo.md` around lines 13 - 33, The table's "依存" column wording is
ambiguous (row for "Markdown linter (markdownlint-cli2) hook 統合" reads "なし (順位 6
の前提)") so clarify the column semantics and adjust the cell text: change the
column header "依存" to "依存(前提/影響)" or add a short footnote under the table
explaining whether the parenthetical indicates "this task requires X" vs "this
task is a prerequisite for X", and update the row for the Markdown linter task
to an explicit phrase such as "なし(このタスクは順位6の前提ではない / ただし順位6に影響あり)" to remove
ambiguity; locate and edit the table and the cell containing "Markdown linter
(markdownlint-cli2) hook 統合" and the cell containing "なし (順位 6 の前提)"
accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@__parse_transcripts.ps1`:
- Around line 1-2: The script currently hardcodes a user-specific path into the
$dir variable (and a second hardcoded path later) which breaks on other
machines; change the script to accept the directory as a parameter (e.g., a
mandatory Param or script argument) and replace the hardcoded $dir assignment
and the second fixed-path occurrence with that parameter, then add a validation
step that checks Test-Path on the provided directory and emits a clear error and
exits if it does not exist before computing $files (used in the
Get-ChildItem/Sort-Object pipeline).
- Around line 7-8: 現在の JSON パースでは ConvertFrom-Json に -ErrorAction
SilentlyContinue を付け、後続の catch { } が空のためパースエラーが完全に無視されています。ConvertFrom-Json の
-ErrorAction を削除するか -ErrorAction Stop にして、同じ try/catch ブロック(参照: ConvertFrom-Json
と $obj の代入、および既存の catch {})で例外を捕捉し、catch 内でスキップされた行の最小限の情報(問題の $line
の内容、エラーメッセージ/例外オブジェクト)を Write-Warning か Write-Error
で出力するようにしてください。これによりデータ損失したレコードの特定が可能になります。

---

Outside diff comments:
In `@docs/todo2.md`:
- Line 7: docs/todo2.md
の参照アンカーが古い日付「推奨実行順序サマリー-2026-04-27-更新」を指しているためリンク切れになっています。該当の参照を新しい見出しアンカー名「推奨実行順序サマリー-2026-04-28-更新」に置き換え(または
docs/todo.md 側の正確なアンカー名に合わせる)ように修正してください。該当箇所はファイル内の "推奨実行順序"
を含む行で、置換対象の文字列を更新すれば完了です。

---

Nitpick comments:
In `@docs/todo.md`:
- Around line 13-33: The table's "依存" column wording is ambiguous (row for
"Markdown linter (markdownlint-cli2) hook 統合" reads "なし (順位 6 の前提)") so clarify
the column semantics and adjust the cell text: change the column header "依存" to
"依存(前提/影響)" or add a short footnote under the table explaining whether the
parenthetical indicates "this task requires X" vs "this task is a prerequisite
for X", and update the row for the Markdown linter task to an explicit phrase
such as "なし(このタスクは順位6の前提ではない / ただし順位6に影響あり)" to remove ambiguity; locate and
edit the table and the cell containing "Markdown linter (markdownlint-cli2) hook
統合" and the cell containing "なし (順位 6 の前提)" accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a105b57c-6056-43bc-a322-120f87db11a3

📥 Commits

Reviewing files that changed from the base of the PR and between 0a5b90d and 139cbe9.

📒 Files selected for processing (3)
  • __parse_transcripts.ps1
  • docs/todo.md
  • docs/todo2.md

Comment thread __parse_transcripts.ps1 Outdated
Comment on lines +1 to +2
$dir = "C:\Users\HIROKI\.claude\projects\e--work-claude-code-hook-test"
$files = Get-ChildItem $dir -Filter "*.jsonl" | Sort-Object LastWriteTime -Descending | Select-Object -First 50
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

絶対パス固定のため、他環境で実行不能になります。

Line 1 と Line 19 がユーザー/端末依存の固定パスです。CI や別開発者環境では失敗するため、引数化して存在チェックを入れてください。

修正案(パラメータ化 + パス検証)
-$dir = "C:\Users\HIROKI\.claude\projects\e--work-claude-code-hook-test"
-$files = Get-ChildItem $dir -Filter "*.jsonl" | Sort-Object LastWriteTime -Descending | Select-Object -First 50
+param(
+    [Parameter(Mandatory)]
+    [string]$TranscriptDir,
+    [string]$OutputPath = (Join-Path $PSScriptRoot "__bash_cmds.tmp.txt"),
+    [int]$MaxFiles = 50
+)
+
+if (-not (Test-Path -LiteralPath $TranscriptDir -PathType Container)) {
+    throw "Transcript directory not found: $TranscriptDir"
+}
+
+$outputDir = Split-Path -Parent $OutputPath
+if ($outputDir -and -not (Test-Path -LiteralPath $outputDir -PathType Container)) {
+    New-Item -ItemType Directory -Path $outputDir -Force | Out-Null
+}
+
+$files = Get-ChildItem -LiteralPath $TranscriptDir -Filter "*.jsonl" -File |
+    Sort-Object LastWriteTime -Descending |
+    Select-Object -First $MaxFiles
@@
-$bashCmds | Out-File "E:\work\claude-code-hook-test\__bash_cmds.tmp.txt" -Encoding UTF8
+$bashCmds | Out-File -FilePath $OutputPath -Encoding UTF8

Also applies to: 19-19

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@__parse_transcripts.ps1` around lines 1 - 2, The script currently hardcodes a
user-specific path into the $dir variable (and a second hardcoded path later)
which breaks on other machines; change the script to accept the directory as a
parameter (e.g., a mandatory Param or script argument) and replace the hardcoded
$dir assignment and the second fixed-path occurrence with that parameter, then
add a validation step that checks Test-Path on the provided directory and emits
a clear error and exits if it does not exist before computing $files (used in
the Get-ChildItem/Sort-Object pipeline).

Comment thread __parse_transcripts.ps1 Outdated
Comment on lines +7 to +8
try {
$obj = $line | ConvertFrom-Json -ErrorAction SilentlyContinue
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

find . -name "__parse_transcripts.ps1" -type f

Repository: aloekun/claude-code-hook-test

Length of output: 99


🏁 Script executed:

cat -n ./__parse_transcripts.ps1

Repository: aloekun/claude-code-hook-test

Length of output: 1115


catch ブロックと -ErrorAction SilentlyContinue により、解析失敗が完全に隠蔽されています。

Line 8 の -ErrorAction SilentlyContinue と Line 16 の空 catch {} の組み合わせにより、JSON解析失敗や予期しない例外が無音で捨てられ、データ損失を検知できません。スキップされたレコードについて最低限のログを記録してください。

修正案
         try {
-            $obj = $line | ConvertFrom-Json -ErrorAction SilentlyContinue
+            $obj = $line | ConvertFrom-Json -ErrorAction Stop
             if ($obj.type -eq "assistant") {
                 foreach ($c in $obj.message.content) {
                     if ($c.type -eq "tool_use" -and $c.name -eq "Bash" -and $c.input.command) {
                         $bashCmds.Add($c.input.command)
                     }
                 }
             }
-        } catch {}
+        } catch {
+            Write-Verbose "Skipped invalid record in $($f.Name): $($_.Exception.Message)"
+        }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@__parse_transcripts.ps1` around lines 7 - 8, 現在の JSON パースでは ConvertFrom-Json
に -ErrorAction SilentlyContinue を付け、後続の catch { }
が空のためパースエラーが完全に無視されています。ConvertFrom-Json の -ErrorAction を削除するか -ErrorAction Stop
にして、同じ try/catch ブロック(参照: ConvertFrom-Json と $obj の代入、および既存の catch
{})で例外を捕捉し、catch 内でスキップされた行の最小限の情報(問題の $line の内容、エラーメッセージ/例外オブジェクト)を
Write-Warning か Write-Error で出力するようにしてください。これによりデータ損失したレコードの特定が可能になります。

@aloekun aloekun force-pushed the todo-cleanup-rank-1-3 branch from 139cbe9 to f1c62dc Compare April 28, 2026 04:26
@aloekun aloekun merged commit 070ab84 into master Apr 28, 2026
1 check passed
@aloekun aloekun deleted the todo-cleanup-rank-1-3 branch April 28, 2026 04:30
aloekun added a commit that referenced this pull request Apr 29, 2026
…Bundle 1) (#91)

* feat(lint): add PowerShell + Markdown anchor rules to ADR-007 layer

Bundle 1 (post-merge-feedback の旧順位 3 + 7 を 1 PR に統合):

- no-empty-powershell-catch (error): 空 `catch {}` ブロックでの swallowed error
  検出 (PR #85 T1-2 finding)
- no-silent-error-action (warning): `-ErrorAction SilentlyContinue` の検出
  (PR #85 T1-2 finding、片方単独 warning)
- no-mutable-anchor (warning): Markdown link の non-ASCII GFM fragment 検出
  (PR #89 T1-1 finding)

実装:
- .claude/custom-lint-rules.toml に 3 rule 追加
- src/hooks-post-tool-linter/src/main.rs に 13 unit test 追加
  (#7 の 4 edge case + ps1 / extension filter 全網羅)
- cargo test: 58 passed
- dogfood で 3 rule すべて発火確認

設計判断:
- ADR-007 既存 pattern (regex 層 / file 単位) に適合、ADR 更新不要
- #3 の "片方単独 warning / 組合せ error" spec は engine の per-line 設計で
  実現できないため、severity を rule 別に分離 (empty catch=error /
  SilentlyContinue=warning) で精神を保つ
- #7 は ADR-007 Q2 (string literal 誤検出) が borderline だが、MVP として
  regex 層採用。lookbehind 非対応のため backtick 内例は誤検出するが、
  task entry 削除で clean baseline 達成

Bundle 戦略 (post-merge-feedback ループ収束のため):
- 個別 PR なら 2 件 → 1 PR に統合 (50% 削減)
- summary table を 27 → 25 行に renumber、Tier breakdown 全更新

Closes feedback: PR #85 T1-2, PR #89 T1-1

* fix(lint): apply CodeRabbit findings on PR #91

PR #91 で受けた CodeRabbit findings 2 件を child commit として修正。

1. Major: PowerShell rule case-insensitivity (.claude/custom-lint-rules.toml:115-118)
   - PowerShell の `catch` keyword と `-ErrorAction` parameter は case-insensitive
     なので、`Catch {}` / `CATCH {}` / `-erroraction silentlycontinue` /
     `-ErrorAction SILENTLYCONTINUE` などの大文字バリアントは現 regex で見逃していた
   - 両 rule の pattern に Rust regex `(?i)` inline flag を追加して case-insensitive
     マッチに変更
   - test helper (ps_empty_catch_rule / ps_silent_error_rule) も同様に更新

2. Minor: docs/todo.md stale references (lines 68 / 250 / 264)
   - Bundle 1 の renumber (27 \u2192 25) で本文内の cross-reference が追従漏れ
   - line 68: `Tier 4 (順位 25/26)` \u2192 `24/25`
   - line 250: `Tier 5 (順位 26/26)` \u2192 `25/25`、`順位 25` \u2192 `順位 24`
   - line 264: `Tier 2 (順位 9/26)` \u2192 `7/25`、`順位 17 (ADR-032 PR-β)` \u2192 `順位 16`

実装 (TDD):
- 先に case-insensitive variant の 4 unit test を追加し、cargo test で FAIL を実証 (RED)
- (?i) flag 追加で GREEN \u2192 62 tests pass (旧 58 + 新 4)
- bad/good example も大文字混在ケースで影響なしを確認 (regex は (?i) 範囲)

順位 23 (todo.md 採番管理の簡素化 ADR 起案、PR #86 T3-3) で構造的解決予定。
本 fix は当面の対症療法として cross-ref を手作業で同期。

* fix(lint): detect multi-line empty catch blocks (file-level regex)

PR #91 の 2nd CodeRabbit review で指摘された Major finding を修正。

問題:
- run_custom_rules() が `for line in content.lines()` で行ごとに regex.find() を
  呼ぶ実装だったため、PowerShell 慣用形 `} catch {\n}` の複数行空ブロックが
  検出できなかった (no-empty-powershell-catch は error severity なのに false
  negative)。
- 既存パターン (console.log( / no-personal-paths / no-mutable-anchor 等) は
  すべて行内完結のため挙動変化なし。SilentlyContinue は \s+ で改行を跨ぎ得るが、
  PowerShell の backtick 行継続を含む正当な使用も検出対象として妥当。

修正:
- run_custom_rules() を file-level マッチに変更
  (`compiled.regex.find_iter(&content)` でファイル全体を走査)
- match の byte offset から改行カウントで line 番号を逆算
  (`content[..m.start()].bytes().filter(|b| *b == b'\n').count() + 1`)
- MAX_CUSTOM_VIOLATIONS の上限と既存テスト挙動はそのまま維持

実装 (TDD):
- ps_empty_catch_detects_multiline_block test を追加し RED 確認
  (既存実装で 0 件検出 → 1 件期待で FAIL)
- 修正後 GREEN \u2192 63 tests pass (旧 62 + 新 1)

* fix(lint): exclude external URLs from no-mutable-anchor (path `:` exclusion)

PR #91 の 3rd CodeRabbit review で指摘された Minor finding を修正。

問題:
- regex `\]\([^)#]*#[^\x00-\x7F)]+` は path 部に `:` を許容するため、
  `[link](https://example.com/#日本語)` のような外部 URL の fragment を
  GFM anchor と誤判定 (false positive)。
- 外部 URL の fragment は GFM anchor ではないため、warning rule の
  alert fatigue を招く。

修正:
- regex を `\]\([^)#:]*#[^\x00-\x7F)]+` に変更 (path 部から `:` を除外)。
  http(s):// を含む URL は path 部マッチで止まるため対象外になる。
- protocol-relative URL (`//example.com/...`) は `:` を含まないため除外
  できないが、Markdown 文書では稀なので許容。
- CodeRabbit 提案の negative lookahead は Rust regex 非対応なので、
  character class 否定 1 文字追加で同等効果を実現。

実装 (TDD):
- md_mutable_anchor_skips_external_url_with_fragment test を追加 → RED
  (`[spec](https://example.com/#日本語)` で 1 件検出 → 0 件期待で FAIL)
- pattern 修正後 GREEN \u2192 64 tests pass (旧 63 + 新 1)
aloekun added a commit that referenced this pull request Apr 29, 2026
* feat(adr): ADR-033 todo numbering simplification (試験運用)

PR #85/#86/#88/#89/#90/#91/Bundle 1 で連続発生した renumber 作業の構造的負債を
解消する ADR を起案。

問題:
- docs/todo.md の本文中 `順位 N` cross-reference が線形コストで増加
- PR #91 では 4 件追加に対し本文 8 箇所修正、過去 PR で stale reference の
  追従漏れによる CodeRabbit Minor 指摘が発生 (a15b263 で修正)
- 採番のみが情報源で、本文と表の往復が発生

決定 (選択肢 B 採用):
- 絶対番号 (`順位 N`) は推奨実行順序サマリー table のみに保持
- 本文での参照は task 名 (heading text or 略称) で行う
- table の `依存` 列のみ絶対番号を許可 (table 内なので renumber 同期可能)
- 「Tier N (順位 X/Y)」表記の `(順位 X/Y)` 部分は除去 → `Tier N` のみ残す

却下した選択肢:
- 選択肢 A (renumber script の自動化): 保守コスト新規発生、問題のすり替え
- 選択肢 C (現状維持): convergence loop の一因、線形増加は止まらない

本 commit は ADR と CLAUDE.md リンク追加のみ。本文 cross-ref の一括変換と
新規 entry template は次の commit で実施。

References:
- docs/adr/adr-013, adr-022, adr-028
- .claude/feedback-reports/86.md Tier 3 #3 (起案動機の起源)
- PR #91 a15b263 (stale reference 起因の Minor 指摘実例)

* refactor(docs): remove inline rank references from todo files

ADR-033 のガイドライン適用。docs/todo.md / todo2.md / todo3.md の本文中
`順位 N` cross-reference をすべて task 名参照に変換。

変更対象:
- docs/todo.md: 戦略 section の 12 箇所、Tier 4/5 entry の (順位 X/Y) 表記、
  週次レビュー entry の cross-ref
- docs/todo2.md: ADR-032 series の Phase ごと優先度表記、reviewer facet /
  各 Tier 1/2/3 entry の (順位 X/Y) と inline 参照
- docs/todo3.md: Stop hook lint:md / AI 生成一時スクリプト / cli-pr-monitor
  polling 延長 / post-pr-review rate-limit / .failed marker / Recovery 経路 /
  REJECT-ESCALATE entry の inline 参照を全て task 名に変換

維持した absolute number:
- docs/todo.md の推奨実行順序サマリー table の `順位` 列 (source of truth)
- table の `依存` 列の絶対番号 (table 内なので renumber と同期可能)
- table 内 cell の歴史的 `旧順位 N` 表記 (完了済み task の参照)

未変換の例外:
- docs/todo2.md line 696 の採番管理 ADR 元 entry の `(順位 24/26)` は
  本 PR の Commit 3 で entry 全体を削除するため未変換 (削除待ち)

検証:
```sh
grep -nE '順位 [0-9]+' docs/todo.md docs/todo2.md docs/todo3.md
# 期待: docs/todo.md table 列のみ + docs/todo2.md 採番管理 ADR 元 entry のみ
```

References:
- docs/adr/adr-033-todo-numbering-simplification.md (本 ADR の決定)

* docs(todo): remove completed numbering simplification ADR entry

ADR-033 land により採番管理簡素化 task が完了したため、運用ルール
(memory feedback_todo_no_history.md) に従い元 entry を削除する。

変更:
- docs/todo2.md: "todo.md 採番管理の簡素化 ADR 起案 (PR #86 T3-3)" entry
  全体 (40 行) を削除
- docs/todo.md summary table:
  - 旧順位 27 (採番管理 ADR) 行を削除
  - 旧順位 28 (ADR-030 Phase E/F) → 順位 27 に renumber
  - 旧順位 29 (ADR-030 takt-test-vc) → 順位 28 に renumber、依存表記の
    `順位 28 Phase F` も `順位 27 Phase F` に追従
  - サマリー header 日付ラベルを "Bundle 1 完了後" → "ADR-033 land 後" に更新

検証:
- 本文 cross-ref は Commit 2 で除去済のため、本 commit の renumber は
  table 行と `依存` 列のみで完結 (ADR-033 の効果を本 PR 内で実証)
- markdownlint pass (PostToolUse hook で各 Edit ごとに検証)

* fix(adr): apply CodeRabbit findings on PR #92

PR #92 で受けた CodeRabbit Minor findings 2 件を child commit として修正。
両 finding は self-consistent: Finding 1 の改善 regex が Finding 2 の placeholder
残存を機械的に検出可能になる。

1. Minor: ADR-033 line 111 の検証 regex が数値以外の placeholder を見逃す
   - 旧: `順位 [0-9]+` (数値のみマッチ)
   - 新: `順位 [0-9A-Za-z_-]+` (英字 placeholder `順位 X` / `順位 N` も検出)
   - 期待コメントも更新し、placeholder 検出意図を明記

2. Minor: docs/todo3.md line 511 (REJECT-ESCALATE entry の動機セクション) で
   `.claude/ filter (順位 X = T2-1+T3-2 Bundle)` という placeholder が残存
   - 旧: `.claude/ filter (順位 X = T2-1+T3-2 Bundle)`
   - 新: `.claude/ filter + ADR-030 制約明記 task (PR #91 T2-1 + T3-2 Bundle)`
   - ADR-033 「本文はタスク名参照」方針に準拠

検証 (改善 regex で 0 件達成):
```sh
grep -nE "順位 [0-9A-Za-z_-]+" docs/todo.md docs/todo2.md docs/todo3.md   | grep -vE "推奨実行順序サマリー|^[^:]+:[0-9]+:\| [0-9]+ \|"
# 結果: 0 行
```
aloekun added a commit that referenced this pull request May 4, 2026
…位 23/24/25/26/30/33/70) (#111)

* feat(rules): Bundle e (convention long-tail) — 7 件 global rules 集約 (順位 23/24/25/26/30/33/70)

## Bundle e 実装

global rules (~/.claude/) は project repo 外のため diff に現れないが、本 PR 完了で全 project に即時適用される:

- 順位 23 (XS): coding-style.md Markdown 節新設 — 日付入り見出しアンカーは安定 ASCII identifier 優先、grep -rn でクロスファイル参照確認
- 順位 24 (XS): git-workflow.md jj Operations 拡張 — jj conflict リカバリ手順 (規模別の使い分け、大規模は jj abandon + jj new master + 再 edit が高速)
- 順位 25 (XS): CLAUDE.md Personal Preferences > Code Style 拡張 — __ prefix scratch 規約 + jj auto-snapshot 特性 (PR #85 事例由来)
- 順位 26 (XS): development-workflow.md 「背景タスクの待機方針」節新設 — polling 禁止 (token 浪費防止、ADR-018 補強)
- 順位 30 (XS): coding-style.md Cross-File Reference Lifecycle に具体例追記 — Rust raw string / TOML / JSONC の 3 種類 anti-pattern + raw string 編集時補助
- 順位 33 (XS): code-review.md Multi-point synchronization 節新設 — 新 verdict 経路追加時の 3 点同期チェック (PR #95 由来)
- 順位 70 (XS): code-review.md 同節内に追記 — 設計 doc / 実装の同期チェック (PR #110 OBS-2 由来、commit message に乖離理由を明記)

## 副次変更 (project repo 内)

- docs/todo2.md: 順位 23/24/25/26 詳細エントリ削除
- docs/todo3.md: 順位 30/33 詳細エントリ削除
- docs/todo5.md: 順位 70 詳細エントリ削除
- docs/todo.md: priority table から 7 行削除、Bundle U/V/d/e 脚注更新 (Bundle U/V は完全消化)
- docs/docs-pr-iteration-efficiency.md: 📋 LOW IMPACT + 後回し可セクションを Bundle "e" ✅ 完了に集約

## 同梱 (Bundle d 登録、PR #110 post-merge-feedback 採用案、前ターンで registered)

- docs/todo5.md: 順位 68/69 詳細エントリ追加 (順位 70 は本 PR で land のため別途削除)
- docs/todo.md: priority table に 順位 68/69/70 追加済み (70 は本 PR で削除に転じた)
- 残る 順位 68 (test infra) と 順位 69 (config コメント) は scope 異なるため独立 PR 推奨

## Bundle U/V/d 終了状態

- Bundle U (順位 29 = PR #110、順位 30 = 本 PR) 完全消化
- Bundle V (順位 31/32 = PR #109、順位 33 = 本 PR) 完全消化
- Bundle d (順位 70 = 本 PR、順位 68/69 残存) 部分消化

## 期待効果 (検証は dogfood)

- AI / 人間が新セッションで convention に自然に follow する (rule 自動参照)
- PR #110 で導入した no-ephemeral-todo-reference lint rule (machine 層) と本 PR の Cross-File Reference Lifecycle 具体例 (guideline 層) で二層防御
- spec-impl drift パターンが code-review.md checklist で意識化される

* fix(review): apply CodeRabbit fixes for #111

Resolved findings:
- [Critical] docs/docs-pr-iteration-efficiency.md:49 docs/docs-pr-iteration-efficiency.md の CLAUDE.md へのcodify 内容について記述と実ファイルの齟齬を修正してください
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant